#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: node05_merge.py 
@version:
@time: 2022/05/18 
"""
# 06
from TapClientCore.T04_logic.Dag02.node.operate_node.node08_field_rename import FieldRenameNode


class Merge(FieldRenameNode):
    """
    [
          {
            "label": "CITY",
            "value": "CITY",
            "isPrimaryKey": false
          },
          {
            "label": "column_1",
            "value": "column_1",
            "isPrimaryKey": false
          }
          ]
    """

    def generate_node(self, op):
        node = {
            "attrs": {
                "position": [
                    -500,
                    200
                ]
            },
            "catalog": "processor",
            "elementType": "Node",
            "id": self.newId,
            "mergeProperties": [],
            "name": "自动化-主从合并",
            "processorThreadNum": 1,
            "type": "merge_table_processor",
        }
        self.node = node
